﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NineMine.DataModel
{
    public class ChangeSet
    {
        [Key]
        public long Id { get; set; }

        public Repository Repository { get; set; }

        [MaxLength(255)]
        public string Revision { get; set; }

        [MaxLength(255)]
        public string Commiter { get; set; }

        [Required]
        public DateTime CommittedOn { get; set; }

        [Column(TypeName = "ntext")]
        public string Comments { get; set; }

        public DateTime? CommitDate { get; set; }

        [MaxLength(255)]
        public string ScmId { get; set; }

        public User User { get; set; }

        public List<Change> Changes { get; set; }

        public ChangeSet Parent { get; set; }
    }
}
